import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { DepartmentsResolveService } from '../service/DepartmentsResolveService';
import { DepartmentListComponent } from '../components/departmentList/departmentList';
import {AuthGuardService} from '../service/AuthGuardService';

const routes: Routes = [
    {
      path: 'department',
      canActivate: [AuthGuardService],
      component: DepartmentListComponent,
      resolve: {
          results: DepartmentsResolveService
      }
    }
];

@NgModule({
    imports: [ RouterModule.forChild(routes) ],
    exports: [ RouterModule ],
    providers: [
      DepartmentsResolveService
    ]

})
export class DepartmentRoutingModule {}
